const fs = require("fs")

fs.stat("./avatar", (err, data) => {
  if (!err) {
    console.log(data.isFile())
    console.log(data.isDirectory())
  }
})